%% Calculate result
res = [];
for f=freq
f;
 if f>= 15
    res = [res 5];
 else if (f >= 8 & f <= 12)
	res = [res 0];
 else if (f >= 4 & f < 8)
	res = [res 1];
 else if (f >= 0.5 & f <= 4)
	res = [res 3];
 else 
	res = [res 6];
 end end end end
end

hold on;
plot(res,'oy')
hold off